package cn.quevo.core.util;

import cn.quevo.core.entity.BaseEntity;

public class EntityUtil {

    /**
     * 基础属性复制
     *
     * @param source
     * @param target
     * @author July july_sky@foxmail.com
     * @date 2018-04-23 23:34:48
     * @Copyright ©2015-2035 湘豫(北京)科技有限公司. All Rights Reserved.
     * @version 1.0
     */
    public static void copy(BaseEntity source, BaseEntity target) {
        init(source, target);
        target.setId(source.getId());
    }

    /**
     * 登录参数复制
     *
     * @param source
     * @param target
     * @author July july_sky@foxmail.com
     * @date 2018-04-23 23:34:34
     * @Copyright ©2015-2035 湘豫(北京)科技有限公司. All Rights Reserved.
     * @version 1.0
     */
    public static void init(BaseEntity source, BaseEntity target) {
        target.setOperatorId(source.getOperatorId());
        target.setRecordOwnerId(source.getRecordOwnerId());
    }
}
